﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FrameBuilderLib;

namespace Skynet
{
    public partial class SettingsForm : Form
    {
        public SettingsForm()
        {
            InitializeComponent();
        }

        private void cb_concrete_CheckedChanged(object sender, EventArgs e)
        {
            ShowConcrete(cb_concrete.Checked);
        }

        private void ShowConcrete(bool param)
        {
            label1.Visible = label_percent.Visible = nUD_percent.Visible = param;
        }

        private void cb_synonims_CheckedChanged(object sender, EventArgs e)
        {
            
        }

        private void btn_save_Click(object sender, EventArgs e)
        {
            Settings.synonims_concederation = cb_synonims.Checked;
            Settings.concrete_concederation = cb_concrete.Checked;
            Settings.precent = (int)nUD_percent.Value;
            Settings.context_concederation = cb_context.Checked;
            this.Hide();
        }

        private void SettingsForm_Load(object sender, EventArgs e)
        {
            cb_synonims.Checked = Settings.synonims_concederation;
            cb_concrete.Checked = Settings.concrete_concederation;
            cb_context.Checked = Settings.context_concederation;
            nUD_percent.Value = Settings.precent;
        }

        private void btn_cancel_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void cb_context_CheckedChanged(object sender, EventArgs e)
        {

        }
    }
}
